<div class="box col-lg-12">
  <div class="opt col-lg-12">
    <!-- Modal Controller-->
   <!-- Button trigger modal -->
    <div class="left-op">
      <!-- 文件功能 -->
      <div class="btn-group btn-group-sm kod_path_tool ops">
        <a href="/" class="op home"><i class="icon-home"></i></a>
        <div dropdown="dropdown" class="btn-group mb-sm open">
           <button type="button" ng-disabled="disabled" dropdown-toggle="" class="btn dropdown-toggle  op bucket" aria-haspopup="true" aria-expanded="true">
           <i class="fa fa-folder-open folder-right">
           </i>选择一个项目
              <span class="caret"></span>
           </button>
           <ul role="menu" class="dropdown-menu bucket-ops" ng-controller="TypeController"> 
              <li ng-repeat="type in types">
              <button class="btn btn-default project-op" type="button">
              <a ui-sref="app.projectList({perTypeName: type.eh})" id="{{type.eh}}" name="{{type.eh}}" tooltip-placement="right" tooltip="{{type.ch}}（{{type.eh}}）">{{type.ch}}（{{type.eh}}）</a>
              </button>
              </li>
           </ul>
        </div>
        <div id="modal-state"></div>
      </div>
    </div>
    <div class="tools-right">
      <div class="btn-group btn-group-sm">
      <div ng-controller="AddProjectFileController">
              <button ng-click="openConfirm()" class="btn btn-default project-op" type="button">
              +新建项目
              </button>
              </div>
          <div class="list-grid-switch list-switched-on">
            <a class="list-switch" ui-sref="app.projectList({perTypeName: $stateParams.perTypeName})"></a>
            <a class="grid-switch" ui-sref="app.projectIcon({perTypeName: $stateParams.perTypeName})"></a>
          </div>
      </div>
    </div>
    <div style="clear:both">
    </div>
  </div>
  <div class="cnt right-main-layout col-lg-12" ng-controller="UserBlockController">
    <div class="left-cnt col-lg-2">
      <div class="balance">
          <p class="title">账户信息</p>
          <p class="line">用户名：
              {{user}}
          </p>
      </div>
      <div class="info" ng-controller="TotalController">
        <div class="list-group">
          <!-- START list group item-->
          <div class="list-group-item">
             <div class="media-box" ng-repeat="total in totals">
                <div class="pull-left">
                   <span class="fa-stack">
                      <em class="fa fa-circle fa-stack-2x {{total.cor}}"></em>
                      <em class="fa {{total.pattern}} fa-stack-1x fa-inverse text-white"></em>
                   </span>
                </div>
                <div class="media-box-body clearfix">
                   <span class="text-muted pull-right ml">{{total.summary}}</span>
                   <div class="media-box-heading"><a href="#" class="{{total.cor}} m0">{{total.name}}</a>
                   </div>
                </div>
             </div>
          </div>
        </div>
       <!-- END list group-->
      </div>
    </div>
    <div class="right-cnt col-lg-10">
      <div class="right-cnt-inner">
        <div class="" ng-controller="PerProjectController">
          <div class="right-cnt-head">
          <label ng-repeat="selectedTag in selectedTags">
              {{selectedTag}}
              </label>
            <div>
              <button type="button" class="mb-sm btn btn-primary" ng-show="prolist"><em class="fa fa-download"></em>下载</button>
              <button type="button" class="mb-sm btn btn-primary" ng-show="prolist"><em class="fa fa-share-alt"></em>分享</button>
              <button type="button" class="mb-sm btn btn-primary" ng-show="prolist" ng-click="removePerproject(selectedTag)"><em class="fa fa-trash"></em></em>删除</button>
            </div>
          </div>
          <!-- Editable row-->
          <table class="table table-bordered table-hover bg-white" datatable="ng" dt-options="dtOptions" dt-column-defs="dtColumnDefs">
            <thead>
             <tr style="font-weight: bold">
                <th style="width:5%">
                  <div data-toggle="tooltip" class="checkbox c-checkbox" data-title="Check All" >
                     <label>
                        <input type="checkbox" id="all" ng-click="allCheckOrNot($event)"/>
                        <span class="fa fa-check"></span>
                     </label>
                  </div>
                </th>
                <th style="width:55%">Name</th>
                <th style="width:20%">Type</th>
                <th style="width:20%"></th>
             </tr>
             </thead>
             <tbody>
             <tr ng-repeat="perproject in projects | unique: 'Title' track by $index" ng-mouseenter="show = true" ng-mouseleave="show = false" context-menu  context-menu="onShow()" context-menu-close="onClose()" data-target="menu-{{ perproject.Title}}">
               <td>
                  <div class="checkbox c-checkbox">
                    <label>
                      <input type="checkbox" id="{{perproject.Title}}" name="{{perproject.Title}}" ng-checked="isSelected(perproject.Title)" data-_id="{{perproject.Title}}" ng-click="updateSelection($event)">
                      <span class="fa fa-check"></span> 
                    </label>
                  </div>
               </td>
               <td>
                  <a ui-sref="app.fileList({projectfileName: perproject.Title})">
                    <!-- editable username (text with validation)-->
                    <img ng-src="{{perproject.src}}" alt="Image" class="media-box-object ppro-img img-circle thumb32">
                    <span editable-text="perproject.Title" e-name="name" e-form="rowform" onbeforesave="checkName($data, perproject.Title)" e-required="">{{perproject.Title}}</span>
                  </a>
                  <!--右键出现的菜单区域-->
                  <div class="dropdown position-fixed" id="menu-{{ perproject.Title}}">
                    <ul class="dropdown-menu" role="menu">
                      <li><a class="pointer" role="menuitem" tabindex="1" ui-sref="app.fileIcon({projectfileName: perproject.Title})"><em class="icon-folder"></em>查看文件</a></li>
                      <li><a class="pointer" role="menuitem" tabindex="2"><em class="icon-cloud-download"></em>下载</a></li>
                      <li ng-controller="ShareController"><a class="pointer" role="menuitem" tabindex="３" ng-click="openshare()"><em class="icon-share-alt"></em>分享</a></li>
                      <li><a class="pointer" role="menuitem" tabindex="４" ng-click="removePerproject(perproject.Title)"><em class="icon-trash"></em>删除</a></li>
                    </ul>
                  </div>
               </td>
               <td>
                  <!-- editable status (select-local)-->
                  <span e-name="size" e-form="rowform" e-ng-options="s.value as s.text for s in size">{{ perproject.Type }}</span>
               </td>
               <td style="white-space: nowrap">
                <div ng-show="show">
                  <!-- form-->
                  <form editable-form="" name="rowform" onbeforesave="savePerproject($data, perproject.Title)" ng-show="rowform.$visible" shown="inserted == perproject" class="form-buttons form-inline">
                     <a type="submit" ng-disabled="rowform.$waiting" ng-click="rowform.$save()" title="Save" class="">
                        <em class="fa fa-save"></em>
                     </a>
                     <a type="button" ng-disabled="rowform.$waiting" ng-click="rowform.$cancel()" title="Cancel" class="">
                        <em class="fa fa-times"></em>
                     </a>
                  </form>
                  <div ng-show="!rowform.$visible" class="">
                     <a ng-click="rowform.$show()" title="Edit" class="">
                        <em class="fa fa-pencil"></em>
                     </a>
                     <a ng-click="removePerproject(perproject.Title)" title="Delete" class="">
                        <em class="fa fa-trash"></em>
                     </a>
                     <a ng-controller="ShareController" ng-click="openshare()" title="Share" class="">
                        <em class="fa fa fa-share-alt"></em>
                     </a>
                  </div>
                </div>
               </td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div> 
</div>
<div ng-controller="AddProjectFileController" class="fileupload col-lg-12">
  <script type="text/ng-template" id="modalDialogId">
    <div class="modal-header" drag-handle>
      <button type="button" data-dismiss="modal" aria-hidden="true" ng-click="closeThisDialog('button')" class="close">×</button>
      <h4 id="myModalLabel" class="modal-title">上传</h4>
    </div>
    <div class="modal-body">
      <scrollable height="100%" class="">
        <div ng-controller="FileUploadController" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">
          <div class="col-md-12">
             <div class="panel">
                <div class="panel-body">
                  <input filestyle="" type="file" data-button-text="文件上传" data-class-button="btn btn-default" data-class-input="form-control inline" nv-file-select=""  file-model="myFile" uploader="uploader" class="form-control" />
                </div>
              </div>
              <div style="margin-bottom: 40px" class="">
                <div class="panel">
                   <div class="panel-body">
                      <p ng-if="uploader.queue.length" class="pull-right label label-info">Queue length: {{ uploader.queue.length }}</p>
                      <p ng-if="!uploader.queue.length" class="lead text-center">拖拽文件上传</p>
                      <div ng-if="uploader.queue.length">
                         <table ng-if="uploader.queue.length" class="table">
                            <thead>
                               <tr>
                                 <th width="50%">名字</th>
                                 <th ng-show="uploader.isHTML5">大小</th>
                                 <th ng-show="uploader.isHTML5">进&nbsp;&nbsp;&nbsp;&nbsp;度</th>
                                 <th>状&nbsp;&nbsp;态</th>
                                 <th>操&nbsp;&nbsp;作</th>
                                </tr>
                            </thead>
                            <tbody>
                               <tr ng-repeat="item in uploader.queue">
                                  <td>
                                     <strong>{{ item.file.name }}</strong>
                                     <input type="text" id="uploadFileName" class="addstu" value="{{ item.file.name }}" />
                                  </td>
                                  <td ng-show="uploader.isHTML5" nowrap="">{{ item.file.size/1024/1024|number:2 }} MB</td>
                                  <td ng-show="uploader.isHTML5">
                                     <div style="margin-bottom: 0;" class="progress progress-xs">
                                        <div role="progressbar" ng-style="{ 'width': item.progress + '%' }" class="progress-bar"></div>
                                     </div>
                                  </td>
                                  <td class="text-center">
                                     <span ng-show="isSuccess">
                                        <em class="fa fa-check fa-fw"></em>
                                     </span>
                                     <span ng-show="item.isCancel">
                                        <em class="fa fa-ban-circle fa-fw"></em>
                                     </span>
                                     <span ng-show="item.isError">
                                        <em class="fa fa-times fa-fw"></em>
                                     </span>
                                  </td>
                                  <td nowrap="">
                                     <button type="button" ng-click="uploadFile()" ng-disabled="item.isReady || item.isUploading || item.isSuccess" class="btn btn-info btn-xs">
                                        <span class="icon-cloud-upload mr"></span>上传</button>
                                     <button type="button" ng-click="item.cancel()" ng-disabled="!item.isUploading" class="btn btn-warning btn-xs">
                                        <span class="icon-close mr"></span>取消</button>
                                     <button type="button" ng-click="item.remove()" class="btn btn-danger btn-xs">
                                        <span class="icon-trash mr"></span>删除</button>
                                  </td>
                               </tr>
                            </tbody>
                         </table>
                      </div>
                   </div>
                </div>
             </div>
          </div>
        </div>
        <div class="block-center" ng-controller="AddProjectController">
          <button type="submit" ng-click="openWithoutOverlay()" class="btn  btn-primary block-center">新建</button>
        </div>
        <div class="block-center" ng-controller="PersonalProjectDataController">
          <div class="form-group">
            <ui-select ng-model="study.selected" theme="bootstrap" ng-disabled="disabled" class="perdata text-left">
              <ui-select-match placeholder="Study">{{$select.selected.Title}}</ui-select-match>
              <ui-select-choices repeat="study in studys | filter: $select.search">
                <span ng-bind-html="study.Title | highlight: $select.search"></span>
              </ui-select-choices>
            </ui-select>
            <input type="text" id="uploadStudyName" class="addstu" value="{{study.selected.Title}}" />
          </div>
          <div class="form-group">
            <ui-select ng-model="experiment.selected" theme="bootstrap" ng-disabled="disabled" class="perdata per-exp text-left">
              <ui-select-match placeholder="Experiment">{{$select.selected.Title}}</ui-select-match>
              <ui-select-choices repeat="experiment in experiments | filter: $select.search">
                <span ng-bind-html="experiment.Title | highlight: $select.search"></span>
              </ui-select-choices>
            </ui-select>
            <input type="text" id="uploadExperimentName" class="addstu" value="{{experiment.selected.Title}}" />
          </div>
          <div class="form-group">
            <ui-select ng-model="sample.selected" theme="bootstrap" ng-disabled="disabled" class="perdata per-sam text-left">
              <ui-select-match placeholder="Sample">{{$select.selected.Title}}</ui-select-match>
              <ui-select-choices repeat="sample in samples | filter: $select.search">
                <span ng-bind-html="sample.Title | highlight: $select.search"></span>
              </ui-select-choices>
            </ui-select>
            <input type="text" id="uploadSampleName" class="addstu" value="{{sample.selected.Title}}" />
          </div>
          <div class="form-group">
            <ui-select ng-model="run.selected" theme="bootstrap" ng-disabled="disabled" class="perdata per-run text-left">
              <ui-select-match placeholder="Run">{{$select.selected.Title}}</ui-select-match>
              <ui-select-choices repeat="run in runs | filter: $select.search">
                <span ng-bind-html="run.Title | highlight: $select.search"></span>
              </ui-select-choices>
            </ui-select>
            <input type="text" id="uploadRunName" class="addstu" value="{{run.selected.Title}}" />
          </div>
        <div>
      </scrollable>
      </div>
      </div>
    </div>
    <div class="modal-footer" ng-controller="ProjectFileFormController">
      <button type="submit" class="btn btn-block btn-primary wd-xl block-center" ng-click="file()" >上传</button>
    </div>
  </script>
</div>
<div ng-controller="AddProjectController">
  <script type="text/ng-template" id="addProjectId">
    <div class="modal-header">
      <button type="button" data-dismiss="modal" aria-hidden="true" ng-click="closeThisDialog('button')"  class="close">×</button>
      <h4 id="myModalLabel" class="modal-title">新建项目</h4>
    </div>
    <div class="modal-body">
      <div ng-controller="StudyAddController" class="block-center">
         <form role="form" ng-submit="studyadd()" name="studyAddForm" novalidate="" class="form-validate mb-lg">
            <div class="modal-body block-center" ng-controller="DatatableController">
              <div class="form-group">
                <div class="form-group has-feedback">
                  <ui-select ng-model="project.selected"  theme="bootstrap" ng-disabled="disabled" class="text-left">
                     <ui-select-match placeholder="请选择项目类别">{{$select.selected.Name}}</ui-select-match>
                     <ui-select-choices repeat="project in projects | filter: $select.search">
                        <span ng-bind-html="project.Name | highlight: $select.search"></span>
                     </ui-select-choices>
                  </ui-select>
                  <input id="stuproject" type="text" class="addstu" value="{{project.selected.Name}}"/>
                   <span ng-show="studyAddForm.account_stupro.$dirty &amp;&amp; studyAddForm.account_stupro.$error.required" class="text-danger">请选择组织</span>
                </div>
                <div class="form-group has-feedback">
                   <input id="exampleInputName1" type="text" name="account_name" placeholder="项目名称" autocomplete="off" ng-model="study.Title" required="" class="form-control" />
                   <span class="fa fa-eyedropper form-control-feedback text-muted"></span>
                   <span ng-show="studyAddForm.account_name.$dirty &amp;&amp; studyAddForm.account_name.$error.required" class="text-danger">项目名称不能为空</span>
                </div>
                <div class="form-group has-feedback">
                  <ui-select ng-model="organism.selected"  theme="bootstrap" ng-disabled="disabled" class="text-left">
                     <ui-select-match placeholder="请选择组织">{{$select.selected.Name}}</ui-select-match>
                     <ui-select-choices repeat="organism in organisms | filter: $select.search">
                        <span ng-bind-html="organism.Name | highlight: $select.search"></span>
                     </ui-select-choices>
                  </ui-select>
                  <input id="stuorganism" type="text" class="addstu" value="{{organism.selected.Name}}"/>
                   <span ng-show="studyAddForm.account_stuorg.$dirty &amp;&amp; studyAddForm.account_stuorg.$error.required" class="text-danger">请选择组织</span>
                </div>
                <div class="form-group has-feedback">
                  <ui-select ng-model="type.selected" theme="bootstrap" ng-disabled="disabled" class="text-left">
                    <ui-select-match placeholder="请选择类型或者输入类型关键字">{{$select.selected.Name}}</ui-select-match>
                    <ui-select-choices repeat="type in types | filter: $select.search">
                      <span ng-bind-html="type.Name | highlight: $select.search"></span>
                    </ui-select-choices>
                  </ui-select>
                  <input type="text" id="stutype" class="addstu" value="{{type.selected.Name}}" />
                  <span ng-show="studyAddForm.account_stutyp.$dirty &amp;&amp; studyAddForm.account_stutyp.$error.required" class="text-danger">请选择类型</span>
                </div>
                <div class="form-group has-feedback">
                   <textarea id="exampleInputDescription1" name="account_description" placeholder="项目描述" ng-model="study.Description" required="" class="form-control" />
                   <span class="fa fa-edit form-control-feedback text-muted"></span>
                   <span ng-show="studyAddForm.account_description.$dirty &amp;&amp; studyAddForm.account_description.$error.required" class="text-danger">项目描述不能为空</span>
                </div>
              </div>
            </div>
            <button type="submit" class="btn btn-block btn-primary wd-xl block-center" ng-click="closeThisDialog('button')" >新建</button>
            <toaster-container toaster-options="{'position-class': 'toast-top-left', 'close-button':true}"></toaster-container>
         </form>
      </div>
    </div>
    <div class="modal-footer">
    </div>
  </script>
</div>
<div ng-controller="ShareController">
  <script type="text/ng-template" id="/myModalShare.html">
    <div class="modal-header">
      <button type="button" data-dismiss="modal" aria-hidden="true" ng-click="cancel()" class="close">×</button>
      <h4 id="myModalLabel" class="modal-title">项目分享</h4>
    </div>
    <div class="modal-body">
       <div ng-controller="FormDemoCtrl" class="">
          <form form-wizard="" steps="3" novalidate="" ng-submit="alertSubmit()">
             <div class="form-wizard wizard-horizontal share-dialog">
                <ol class="row tab">
                   <li ng-class="{'active':wizard.active(1)}" ng-click="wizard.go(1)" class="col-md-3 share-link">
                      <em class="icon"></em>公开分享
                   </li>
                   <li ng-class="{'active':wizard.active(2)}" ng-click="wizard.go(2)" class="col-md-3 share-friend">
                      <em class="icon"></em>发给好友
                   </li>
                   <li ng-class="{'active':wizard.active(3)}" ng-click="wizard.go(3)" class="col-md-3 share-sns">
                      <em class="icon"></em>社区分享
                   </li>
                </ol>
                <div ng-show="wizard.active(1)">
                   <fieldset>
                      <span class="all">生成分享链接，分享到数据库</span> 
                      <div class="create-link"> 
                        <div ng-controller="ShareLinkDemoCtrl" class="panel-body　button-section">
                          <toaster-container toaster-options="{'position-class': 'toast-bottom-right', 'close-button':true}"></toaster-container>
                          <button ng-click="pop()" class="btn btn-primary btn-lg"><em class="icon-share"></em>公开分享</button>
                          <span class="desc-public">（项目会出现在<a href="" target="_blank">数据库主页</a>，其他人都能查看下载）</span>
                        </div>
                      </div>
                      <div class="share-sna">配合净网行动，ＤＮＡ云严厉打击不良信息、色情低俗信息的传播行为，如经发现，或将封号处理。</div>
                   </fieldset>
                </div>
                <div ng-show="wizard.active(2)">
                   <fieldset>
                   <div ng-controller="ShareEmailController" class="block-center mt-xl wd-xl">
                    <form role="form" name="shareEmailForm" novalidate="" ng-submit="shareEmail()" class="form-validate mb-lg">
                      <div class="form-group has-feedback">
                         <label class="text-muted">邮箱地址</label>
                         <input type="email" name="account_email" placeholder="邮箱" autocomplete="off" ng-model="account.email" required="" class="form-control" />
                         <span class="fa fa-envelope form-control-feedback text-muted"></span>
                         <span ng-show="shareEmailForm.account_email.$dirty &amp;&amp; shareEmailForm.account_email.$error.required" class="text-danger">请输入邮箱</span>
                         <span ng-show="shareEmailForm.account_email.$dirty &amp;&amp; shareEmailForm.account_email.$error.email" class="text-danger">请输入有效邮箱地址</span>
                      </div>
                      <button type="submit" class="btn btn-block btn-primary mt-lg">分享</button>
                     
                    </form>
                  </div>
                   </fieldset>
                </div>
                <div ng-show="wizard.active(3)">
                  <fieldset>
                      <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare bdsharebuttonbox" ng-controller="ShareOtherController">    
                      <a class="bds_tsina bd_shares icon" data-cmd="tsina"></a>    
                      <a class="bds_qzone bd_shares icon" data-cmd="qzone"></a>      
                      <a class="bds_tqq bd_shares icon" data-cmd="tqq"></a>    
                      <a class="bds_renren bd_shares icon" data-cmd="renren"></a>   
                    </div>
                  </fieldset>
                </div>
                  </fieldset>
                </div>
                <!-- END Wizard Step inputs -->
             </div>
          </form>
       </div>
    </div>
  </script>
</div>
